//package org.dromara.system.controller.system;
//
//import jakarta.servlet.http.HttpServletResponse;
//import jakarta.validation.constraints.NotEmpty;
//import jakarta.validation.constraints.NotNull;
//import lombok.RequiredArgsConstructor;
//import org.dromara.common.core.domain.R;
//import org.dromara.common.core.validate.AddGroup;
//import org.dromara.common.core.validate.EditGroup;
//import org.dromara.common.excel.utils.ExcelUtil;
//import org.dromara.common.idempotent.annotation.RepeatSubmit;
//import org.dromara.common.log.annotation.Log;
//import org.dromara.common.log.enums.BusinessType;
//import org.dromara.common.mybatis.core.page.PageQuery;
//import org.dromara.common.mybatis.core.page.TableDataInfo;
//import org.dromara.common.satoken.utils.LoginHelper;
//import org.dromara.common.web.core.BaseController;
//import org.dromara.system.constant.MachineConstant;
//import org.dromara.system.domain.bo.SimMallClassificationBo;
//import org.dromara.system.domain.bo.SimUserRenewalBo;
//import org.dromara.system.domain.vo.SimMallClassificationVo;
//import org.dromara.system.domain.vo.SimUserRenewalVo;
//import org.dromara.system.service.ISimUserRenewalService;
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.List;
//
///**
// * 续期成本
// *
// * @author Lion Li
// * @date 2025-08-20
// */
//@Validated
//@RequiredArgsConstructor
//@RestController
//@RequestMapping("/system/userRenewal")
//public class SimUserRenewalController extends BaseController {
//
//    private final ISimUserRenewalService simUserRenewalService;
//
//    /**
//     * 查询续期成本列表
//     */
////    @SaCheckPermission("system:userRenewal:list")
//    @GetMapping("/list")
//    public TableDataInfo<SimUserRenewalVo> list(SimUserRenewalBo bo, PageQuery pageQuery) {
//        return simUserRenewalService.queryPageList(bo, pageQuery);
//    }
//
//    //查询商品分类 小程序
//    @GetMapping("/listReception")
//    public TableDataInfo<SimUserRenewalVo> listReception(SimUserRenewalBo bo, PageQuery pageQuery) {
//        bo.setUserId(LoginHelper.getUserId());
//        return simUserRenewalService.queryPageList(bo, pageQuery);
//    }
//
//    /**
//     * 导出续期成本列表
//     */
////    @SaCheckPermission("system:userRenewal:export")
//    @Log(title = "续期成本", businessType = BusinessType.EXPORT)
//    @PostMapping("/export")
//    public void export(SimUserRenewalBo bo, HttpServletResponse response) {
//        List<SimUserRenewalVo> list = simUserRenewalService.queryList(bo);
//        ExcelUtil.exportExcel(list, "续期成本", SimUserRenewalVo.class, response);
//    }
//
//    /**
//     * 获取续期成本详细信息
//     *
//     * @param id 主键
//     */
////    @SaCheckPermission("system:userRenewal:query")
//    @GetMapping("/{id}")
//    public R<SimUserRenewalVo> getInfo(@NotNull(message = "主键不能为空")
//                                       @PathVariable Long id) {
//        return R.ok(simUserRenewalService.queryById(id));
//    }
//
//    /**
//     * 新增续期成本
//     */
////    @SaCheckPermission("system:userRenewal:add")
//    @Log(title = "续期成本", businessType = BusinessType.INSERT)
//    @RepeatSubmit()
//    @PostMapping()
//    public R<Void> add(@Validated(AddGroup.class) @RequestBody SimUserRenewalBo bo) {
//        return toAjax(simUserRenewalService.insertByBo(bo));
//    }
//
//    /**
//     * 修改续期成本
//     */
////    @SaCheckPermission("system:userRenewal:edit")
//    @Log(title = "续期成本", businessType = BusinessType.UPDATE)
//    @RepeatSubmit()
//    @PutMapping()
//    public R<Void> edit(@Validated(EditGroup.class) @RequestBody SimUserRenewalBo bo) {
//        return toAjax(simUserRenewalService.updateByBo(bo));
//    }
//
//    /**
//     * 删除续期成本
//     *
//     * @param ids 主键串
//     */
////    @SaCheckPermission("system:userRenewal:remove")
//    @Log(title = "续期成本", businessType = BusinessType.DELETE)
//    @DeleteMapping("/{ids}")
//    public R<Void> remove(@NotEmpty(message = "主键不能为空")
//                          @PathVariable Long[] ids) {
//        return toAjax(simUserRenewalService.deleteWithValidByIds(List.of(ids), true));
//    }
//
//
//    @Log(title = "续期成本", businessType = BusinessType.INSERT)
//    @RepeatSubmit()
//    @PostMapping("/saveOrUpdate")
//    public R<Void> saveOrUpdate(@Validated(AddGroup.class) @RequestBody SimUserRenewalBo bo) {
//        return toAjax(simUserRenewalService.saveOrUpdate(bo));
//    }
//
//}
